package com.scraper.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table (name = "agency")
public class Agency implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private Integer id;
	private String agencyName;
	private String address;
	private String description;
	private String url;
	private String phone;
	private List<SaleObject> saleObjects = new ArrayList<SaleObject>();

	@Id
	@GeneratedValue (strategy = GenerationType.AUTO)
	@Column
	public Integer getId() {
		return id;
	}

	@Column
	public String getAgencyName() {
		return agencyName;
	}

	@Column
	public String getAddress() {
		return address;
	}

	@Column
	public String getDescription() {
		return description;
	}

	@Column
	public String getUrl() {
		return url;
	}

	@Column
	public String getPhone() {
		return phone;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public void setAgencyName(String agencyName) {
		this.agencyName = agencyName;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setSaleObjects(List<SaleObject> saleObjects) {
		this.saleObjects = saleObjects;
	}

	@OneToMany
	public List<SaleObject> getSaleObjects() {
		return saleObjects;
	}
	
	
}
